package cn.sunagy.security.maz.api.vo.search;

import java.io.Serializable;

/**
 * @desc：#TODO fill me ！
 * @author：三餘無夢生
 * @date：2018/6/2
 * @time：下午2:52
 */
public class IndexObject implements Comparable<IndexObject>,Serializable {

    private Long id;

    private String title;

    private String keywords;

    private String descripton;

    private String postDate;

    private String url;

    public String getPostDate() {
        return postDate;
    }

    public void setPostDate(String postDate) {
        this.postDate = postDate;
    }

    public String getDescripton() {
        return descripton;
    }

    public void setDescripton(String descripton) {
        this.descripton = descripton;
    }



    /*相似度*/
    private float score;


    public String getKeywords() {
        return keywords;
    }

    public void setKeywords(String keywords) {
        this.keywords = keywords;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }


    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public float getScore() {
        return score;
    }

    public  void setScore(float score) {
        this.score = score;
    }


    public IndexObject() {
        super();
    }

    public IndexObject(Long _id, String _keywords, String _descripton, String _postDate, float _score) {
        super();
        this.id = _id;
        this.keywords = _keywords;
        this.score = _score;
        this.descripton=_descripton;
        this.postDate=_postDate;
    }
    @Override
    public int compareTo(IndexObject o) {
        if(this.score < o.getScore()){
            return 1;
        }else if(this.score > o.getScore()){
            return -1;
        }
        return 0;
    }


}
